﻿/**
 * 
 * @file FITKSEASubSysSemiInfiniteFluid.h
 * @brief 半无限流体声明
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-11-04
 * 
 */
#ifndef _FITK_SEA_SUBSYS_SEMIINFINIATE_FLUID_H___
#define _FITK_SEA_SUBSYS_SEMIINFINIATE_FLUID_H___
 

#include "FITKAbstractSEASubSys.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataObject.h"

namespace Acoustics
{
    class FITKAbstractSEASubSys;
    /**
     * @brief 半无限流子系统中的子系统对象
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-11-04
     */
    class FITKAcousticsModelAPI FITKSEASubSysSEIFConnectedSubSys :
        public Core::FITKAbstractDataObject 
    {
        FITKCLASS(Acoustics, FITKSEASubSysSEIFConnectedSubSys);
    public:
        /**
         * @brief Construct a new FITKSEASubSysSEIFConnectedSubSys object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        explicit FITKSEASubSysSEIFConnectedSubSys() = default;
        /**
         * @brief Destroy the FITKSEASubSysSEIFConnectedSubSys object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        virtual ~FITKSEASubSysSEIFConnectedSubSys() = default;
        /**
         * @brief 子系统ID
         * @param[i]  id             子系统id
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        void setSubSysID(const int id);
        /**
         * @brief 获取子系统ID
         * @return int 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        int getSubSysID() const; 
        /**
         * @brief 获取子系统对象
         * @return FITKAbstractSEASubSys* 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        FITKAbstractSEASubSys* getSubSysObj();
        /**
         * @brief    设置连接位置
         * @param[i] pointPos        连接点位置[3]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setConnectPos(double* pointPos);
        /**
         * @brief    获取连接点位置
         * @param[i] pointPos         连接点位置[3]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void getConnectPos(double* pointPos);
        /**
         * @brief    获取声腔面id
         * @return   int               面id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        int getCavityFaceID();
        /**
         * @brief    设置声腔面id
         * @param[i] cavityFaceID      面id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setCavityFaceID(int cavityFaceID);
        /**
         * @brief    设置距离
         * @param[i] distance      距离 
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setDistance(double distance);
        /**
         * @brief    获取距离
         * @return   double        距离
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        double getDistance();
        /**
         * @brief    设置损耗因子id
         * @param[i] id        损耗因子id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setRadLossFactorID(int id);
        /**
         * @brief    获取损耗因子id
         * @return   int    损耗因子id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        int getRadLossFactor();
    protected:
        /**
         * @brief 子系统ID
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        int _subSystemID{ -1 };
         /**
          * @brief 面ID，只对声腔子系统有效
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-11-04
          */
        int _cavityFaceID{ -1 };
        /**
         * @brief  距离
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-22
         */
        double _distance = 0.0;
        /**
         * @brief  损耗因子id（-1 == Analytical）
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-22
         */
        int _radLossFactorID = -1;
        /**
         * @brief  连接位置
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-22
         */
        double _connectPos[3] = { 0,0,0 };
    };
    /**
     * @brief 半无限流子系统
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-11-04
     */
    class FITKAcousticsModelAPI FITKSEASubSysSemiInfiniteFluid : public FITKAbstractSEASubSys,
        public Core::FITKAbstractDataManager<FITKSEASubSysSEIFConnectedSubSys>
    {
        FITKCLASS(Acoustics, FITKSEASubSysSemiInfiniteFluid);
    public:
        /**
         * @brief Construct a new FITKSEASubSysSemiInfiniteFluid object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        explicit FITKSEASubSysSemiInfiniteFluid() = default;
        /**
         * @brief Destroy the FITKSEASubSysSemiInfiniteFluid object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        virtual ~FITKSEASubSysSemiInfiniteFluid() = default;
        /**
        * @brief 获取子系统类型
        * @return SEASubSysType
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-10-06
        */
        virtual SEASubSysType getSEASubSysType();
        /**
         * @brief 获取点ID
         * @return int 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-04
         */
        int getNodeID() const;
         /**
          * @brief 设置点ID
          * @param[i]  id             点ID
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-11-04
          */
        void setNodeID(const int & id);
        /**
         * @brief 获取节点ID列表
         * @return QList<int>
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-06
         */
        QList<int> getNodeIDs() const override;
        /**
         * @brief    获取是否有效
         * @return   bool             是否有效
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        bool getIsEnabled();
        /**
         * @brief    设置是否有效
         * @param[i] isEnabled        是否有效
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setIsEnabled(bool isEnabled);
        /**
         * @brief    获取是否覆盖SPL距离
         * @return   bool              是否覆盖
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        bool getIsOveSPLDistances();
        /**
         * @brief    设置是否覆盖SPL距离
         * @param[i] isOveSPLDistances  是否覆盖
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-22
         */
        void setIsOveSPLDistances(bool isOveSPLDistances);
    private:
         /**
          * @brief 节点ID
          * @author LiBaojun (libaojunqd@foxmail.com)
          * @date 2024-11-04
          */
        int _nodeID{};
        /**
         * @brief  是否有效
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-22
         */
        bool _isEnabled = true;
        /**
         * @brief  是否覆盖SPL距离
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-22
         */
        bool _isOveSPLDistances = false;
    };
 
}


#endif
